home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Aug 89 / X0102-Re disable invalid -Aug89 < prev    next >
Encoding:
Text File  |  1989-08-25  |  1.5 KB  |  41 lines  |  [TEXT/GEOL]

  1. Item    1581281                         23-Aug-89        17:42
  2.  
  3. From:   MACDTS                          Macintosh Developer Tech. Supt.,APL
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    Re- disable invalid Paste
  8.  
  9. To: Les Caudle, D2215
  10.  
  11. Les,
  12.  
  13. I think that what you suggest for filtering Paste commands is basically the way
  14. to go. I have just a few minor suggestions:
  15.  
  16. When a MenuCommand needs to be handled by a TEditText object, it just passes it
  17. on to the TDialogTEView that TDialogView creates. TDialogTEView checks to make
  18. sure that there is enough room for a paste, and, if so, create a TPasteCommand.
  19.  
  20. What I think you should do is subclass TDialogView that makes a
  21. TFilterDialogTEView, instead of a TDialogTEView. The TFilterDialogTEView would
  22. create a TTEFilterPasteCommand instead. This TTEFilterPasteCommand would then
  23. call TFilterableEditText(fEditText).FilterChars. As long as you make sure that
  24. all of your TEditText items support this call, you can skip the Member(x,y)
  25. test.
  26.  
  27. Also, you may want to perform the filtering on TTEPasteCommand.InstallNewText,
  28. rather than TTEPasteCommand.ITEPasteCommand. Another thing you may want to do
  29. is include some facility for making sure that the Style record is adjusted
  30. accordingly if you chop out characters.
  31.  
  32. On the other hand, you may just want to chuck all of this out the window and
  33. just let TNumberText.Validate handle all of this when the user finishes
  34. editting...
  35.  
  36. Hope this helps,
  37.  
  38. - Keith Rollin
  39. - Apple Developer Technical Support
  40.  
  41.